import {emojiList} from "@/common/emoji";

export const MDVersion = "1.0.1"
const sep = window.path.sep
export const CDN = window.getScriptPath() + window.path.sep+"resource"+ window.path.sep;

export let defaultOptions = {
    _id: "base_options",
    doc_root_path: window.HOME_DIR,
    read_model: false,
    md_version: MDVersion
}


export let defaultMarkDownOptions = {
    md_version: MDVersion,
    height: "100vh", width: "100%",
    _id: "markdown_options",
    icon: "ant",
    cdn: CDN,
    mode: "ir",
    theme: "classic",
    debugger: false, typewriterMode: true, pin: true,
    placeholder: '空空如也哦，写点什么吧！',
    hint: {
        delay: 200,
        emoji: emojiList,
        emojiPath: `${CDN}${sep}dist${sep}images${sep}emoji${sep}`,
        parse: true,
    },

    preview: {
        delay: 500,
        maxWidth: 1000,
        theme: {current: "light", path: `${CDN}${sep}dist${sep}css${sep}content-theme`},
        actions: [],
        math: {
            /** 数学公式渲染引擎。默认值: 'KaTeX' */
            engine: "KaTeX",
            /** 内联数学公式起始 $ 后是否允许数字。默认值: false */
            inlineDigit: false,
            /** 使用 MathJax 渲染时传入的宏定义。默认值: {} */
        },
        hljs: {
            style: "github",
            enable: true,
            lineNumber: false
        }
    },
    counter: {
        enable: false
    },
    cache: {
        enable: false
    },
    toolbar: [
        "emoji", "headings", "bold", "italic", "strike", "link", "|", "list", "ordered-list",
        "check", "outdent", "indent", "|", "quote", "line", "code", "inline-code",
        "|",
        {
            name: "upload",
            tip: '添加图片',
            icon: '<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" class="icon"><g><title>background</title><rect fill="none" id="canvas_background" height="202" width="202" y="-1" x="-1"/></g><g> <title>Layer 1</title><g stroke="null" id="svg_3"><path stroke="null" id="svg_1" d="m22.15529,24.69377l0,150.61246l155.68942,0l0,-150.61246l-155.68942,0zm-7.07679,-13.69204l169.84301,0a7.07679,6.84602 0 0 1 7.07679,6.84602l0,164.30451a7.07679,6.84602 0 0 1 -7.07679,6.84602l-169.84301,0a7.07679,6.84602 0 0 1 -7.07679,-6.84602l0,-164.30451a7.07679,6.84602 0 0 1 7.07679,-6.84602z" fill="currentColor"/><path stroke="null" id="svg_2" d="m71.69283,52.07786q14.15358,0 14.15358,13.69204t-14.15358,13.69204q-14.15358,0 -14.15358,-13.69204t14.15358,-13.69204zm-43.91857,126.00786l-11.23795,-8.32476l47.79665,-60.34083a21.23038,20.53806 0 0 1 29.76499,-3.82008l0.41045,0.31492l27.17488,21.20897a7.07679,6.84602 0 0 0 9.94997,-1.0406l47.76835,-57.73934l11.0398,8.54383l-47.72588,57.72565l-0.05661,0.06846a21.23038,20.53806 0 0 1 -29.86406,3.0944l-27.17488,-21.19528l-0.14154,-0.10954a7.07679,6.84602 0 0 0 -9.90751,1.27336l-47.79665,60.34083z" fill="currentColor"/> </g> </g></svg>'
        },
        "table", "|",
    ]
}
//
// export const contentThemes = ["ant-design", "light", "wechat"];
// export const codeThemes = ["algol", "arduino", "colorful", "emacs", "fruity", "github", "igor", "lovelace", "manni",
//     "monokai", "monokailight", "native", "rainbow_dash", "rrt", "swapoff", "trac", "vs", "ant-design"];
